package com.example.myapplication.ui.adapter;

import android.content.Context;
import android.widget.TextView;

import com.example.myapplication.R;
import com.example.myapplication.ui.adapter.baseadapter.BaseAdapter;
import com.example.myapplication.ui.adapter.baseadapter.ViewHolder;

import java.util.List;

/**
 * Created by meishiyiyun on 2017/5/17.
 */

public class MyAdapter extends BaseAdapter{
    List<String > strings;

    public MyAdapter(Context context, List datas, boolean isOpenLoadMore , List<String > strings) {
        super(context, datas, isOpenLoadMore);
    this.strings=strings;
    }

    @Override
    protected void convert(ViewHolder holder, Object data) {

          ((TextView) holder.getView(R.id.tv_info)).setText(strings.get(holder.getAdapterPosition()).toString());
        ((TextView) holder.getView(R.id.tv_info_name)).setText(data.toString());
    }

    @Override
    protected int getItemLayoutId() {
        return R.layout.my_info_item;
    }
}
